1. Field of the Invention
This invention relates to the field of computer software, and, more specifically, to the use of computer software across multiple platforms in varying environments.
Portions of the disclosure of this patent document contain material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure as it appears in the Patent and Trademark Office file or records, but otherwise reserves all copyright rights whatsoever. Sun, Sun Microsystems, the Sun logo, Java, JavaBeans, and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. All SPARC trademarks are used under license and are trademarks of SPARC International, Inc. in the United States and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc.
2. Background Art
Software developers may create and write computer code such that the code can be used and reused in a variety of different applications. Code that is written in such a format may be referred to as a module or bean. For example, a module may be written that provides the ability to view a word processing document. Other applications can then insert or utilize the pre-programmed module to view a word processing document as part of the application. However, depending on the environment that a developer/user is utilizing the module may not be compatible or execute properly. For example, a developer using a particular type of graphical user interface may not be able to execute or utilize modules written in a programming language that the graphical user interface does not understand. A method for bridging the gap between the module and the graphical user interface is needed and useful.
To provide a better understanding of the prior art, a description of object oriented programming, programming languages, modules and environments is useful.
Object-oriented programming is a method of creating computer programs by combining certain fundamental building blocks, and creating relationships among and between the building blocks. The building blocks in object-oriented programming systems are called xe2x80x9cobjects.xe2x80x9d An object is a programming unit that groups together a data structure (one or more instance variables) and the operations (methods) that can use or affect that data. Thus, an object consists of data and one or more operations or procedures that can be performed on that data.
An object can be instructed to perform one of its methods when it receives a xe2x80x9cmessage.xe2x80x9d One advantage of object-oriented programming is the way in which methods are invoked. When a message is sent to an object, it is not necessary for the message to instruct the object how to perform a certain method. It is only necessary to request that the object execute the method.
Object-oriented programming languages are predominantly based on a xe2x80x9cclassxe2x80x9d scheme. The class-based object-oriented programming scheme is generally described in Lieberman, xe2x80x9cUsing Prototypical Objects to Implement Shared Behavior in Object-Oriented Systems,xe2x80x9d OOPSLA 86 Proceedings, Sep. 1986, pp. 214-223.
A class defines a type of object that typically includes both variables and methods for the class. An object class is used to create a particular instance of an object. An instance of an object class includes the variables and methods defined for the class. Multiple instances of the same class can be created from an object class. Each instance that is created from the object class is said to be of the same type or class.
A hierarchy of classes can be defined such that an object class definition has one or more subclasses. A subclass inherits its parent""s (and grandparent""s etc.) definition. Each subclass in the hierarchy may add to or modify the behavior specified by its parent class.
Applications may be written in a variety of programming languages including FORTRAN, Pascal, Assembly Language, C, C++, Ada, LISP, Small Talk, Visual Basic, or the Java (trademark) programming language.
As described above, in an object-oriented programming language, each program may be comprised of one or more object classes. Classes in such a programming language may be compiled into machine independent bytecode class files. Each class contains code and data in a platform-independent format called the class file format. The computer system acting as the execution vehicle supports the runtime environment (e.g., a Java(trademark) runtime environment if the Java programming language is utilized). The runtime environment contains a program called a virtual machine, which is responsible for executing the code in classes.
Applications may be designed as standalone applications, or as xe2x80x9cappletsxe2x80x9d which may be identified by an applet tag in an HTML document, and loaded by a browser application. The class files associated with an application or applet may be stored on the local computing system, or on a server accessible over a network. Each class is loaded into the runtime environment, as needed, by the xe2x80x9cclass loader.xe2x80x9d
Classes are loaded on demand from the network (stored on a server), or from a local file system, when first referenced during an application or applet""s execution. The runtime environment locates and loads each class file, parses the class file format, allocates memory for the class""s various components, and links the class with other already loaded classes. This process makes the code in the class readily executable by the virtual machine.
Classes may be incorporated into components referred to as modules or JavaBeans (trademark) components. Components or modules may be easily used in multiple applications merely by inserting the module in the code for the desired application. For example, a module that provides a viewer for viewing a word processing document or a PDF (portable document format) document may be inserted in a word processing application that provides the ability to edit and spell check a document. Similarly a module for editing a document in a specific format (e.g., HTML or PDF) may be inserted in an application that provides additional capabilities or services. Additionally, a module for viewing a spreadsheet document or a document in the form of a presentation may be inserted in an application that provides further abilities.
JavaBeans components are designed in accordance with the JavaBeans API Specification to allow for component-based application building. Bridges (e.g., ActiveX bridges) may be used with JavaBeans components to allow JavaBeans components to be used in other component model environments, such as OLE/COM and CORBA. For example, a JavaBeans Bridge for ActiveX enables developers using ActiveX and COM objects to embed JavaBeans in their ActiveX or COM code.
Support for features such as xe2x80x9cintrospection,xe2x80x9d xe2x80x9ccustomization,xe2x80x9d xe2x80x9cevents,xe2x80x9d xe2x80x9cpropertiesxe2x80x9d and xe2x80x9cpersistencexe2x80x9d is provided within the JavaBeans framework to facilitate application building and component use. xe2x80x9cIntrospectionxe2x80x9d permits builder tools to analyze how a particular bean works. xe2x80x9cCustomizationxe2x80x9d permits an application builder to customize the appearance and behavior of a bean. xe2x80x9cEventsxe2x80x9d provide a simple communication metaphor that can be used to connect a bean with other application components or beans. xe2x80x9cPropertiesxe2x80x9d are used for bean customization and programmatic use. xe2x80x9cPersistencexe2x80x9d allows for a bean to have its customized state saved and reloaded later. These features are discussed in the JavaBeans API Specification, Version 1.01, by Sun Microsystems (1997), which is available on the World Wide Web, and is incorporated herein by reference.
The prior art (e.g., the JavaBeans Activation Framework (JAF))provides the ability to utilize a standard service to determine the type of an arbitrary piece of data, encapsulate access to it, discover the operations available on it, and to instantiate the appropriate module to perform the desired operation(s). For example, if a browser obtained a JPEG image, the browser is enabled to identify the stream of data as a JPEG image, and from that type, the browser could locate and instantiate an object/module that could manipulate or view that image.
An environment is a particular configuration of hardware or software. Thus, many different configurations and environments may be utilized in a computer system. Some examples of configurations/environments are the Solaris, UNIX, and Windows ""98 operating systems. Each operating system may present and display information to a user in a different format.
One type of environment used is the Common Desktop Environment (CDE). The CDE is a particular graphical user interface (the graphical display of information to a user on a computer desktop). Implementations of CDE include look-and-feel, window management, messaging services in the desktop, and command and programming interfaces for windowing. CDE may provide numerous capabilities such as the ability to view postscript files, the ability to use a pc (personal computer) proxy to launch an application in a pc, and the ability to view a pc type of document on a Solaris or Sparc. Such capabilities could be useful in alternative environments if they could be executed in the alternative environments.
One or more embodiments of the invention provide CDE applications with the ability to utilize JavaBeans components and applications written in the Java programming language. Such an embodiment provides for the use of a virtual machine that maintains the ability to execute and return results from applications written in the Java programming language.
Similarly, one or more embodiments of the invention provide applications written in the Java programming language with the ability to utilize CDE applications. In one or more such embodiments, a module (referred to as a CDEBean) launches a generic application to perform the datatyping and launch of CDE applications. Since a CDEBean is a JavaBeans component, the use of a CDE application is transparent to the application itself. Consequently, one or more embodiments provide for the transparent use of CDE applications in an application written in the Java programming language.